package dao

import (
	"time"
)

// 这是 LiTrade 的全局公开dao对象
var LiTradeDao = liTradeDao{}

// 这是 li_trade表 的实体类
type LiTrade struct {
	Id                     int       `json:"id" form:"id" v:"id"`                                                                      // ID
	CreateBy               string    `json:"create_by" form:"create_by" v:"create_by"`                                                 // 创建者
	CreateTime             time.Time `json:"create_time" form:"create_time" v:"create_time"`                                           // 创建时间
	DeleteFlag             bool      `json:"delete_flag" form:"delete_flag" v:"delete_flag" gm:"delete_flag"`                          // 删除标志
	UpdateBy               string    `json:"update_by" form:"update_by" v:"update_by"`                                                 // 更新者
	UpdateTime             time.Time `json:"update_time" form:"update_time" v:"update_time"`                                           // 更新时间
	ConsigneeAddressIdPath string    `json:"consignee_address_id_path" form:"consignee_address_id_path" v:"consignee_address_id_path"` // 地址id
	ConsigneeAddressPath   string    `json:"consignee_address_path" form:"consignee_address_path" v:"consignee_address_path"`          // 地址名称
	ConsigneeName          string    `json:"consignee_name" form:"consignee_name" v:"consignee_name"`                                  // 收货人姓名
	DiscountPrice          float64   `json:"discount_price" form:"discount_price" v:"discount_price"`                                  // 优惠的金额
	FlowPrice              float64   `json:"flow_price" form:"flow_price" v:"flow_price"`                                              // 总价格
	FreightPrice           float64   `json:"freight_price" form:"freight_price" v:"freight_price"`                                     // 运费
	GoodsPrice             float64   `json:"goods_price" form:"goods_price" v:"goods_price"`                                           // 原价
	MemberId               string    `json:"member_id" form:"member_id" v:"member_id"`                                                 // 买家id
	MemberName             string    `json:"member_name" form:"member_name" v:"member_name"`                                           // 买家用户名
	PaymentMethod          string    `json:"payment_method" form:"payment_method" v:"payment_method"`                                  // 支付方式
	Sn                     string    `json:"sn" form:"sn" v:"sn"`                                                                      // 交易编号
	DeliveryMethod         string    `json:"delivery_method" form:"delivery_method" v:"delivery_method"`                               // 配送方式
	ConsigneeMobile        string    `json:"consignee_mobile" form:"consignee_mobile" v:"consignee_mobile"`                            // 收件人手机
	PayStatus              string    `json:"pay_status" form:"pay_status" v:"pay_status"`
}

// 注意:这是 LiTrade 的私有dao对象
type liTradeDao struct {
	Insert func(arg LiTrade) int     //插入一条记录
	Update func(arg LiTrade) int     //更新一条记录
	Delete func(arg LiTrade) int     //删除一条记录
	Select func(arg LiTrade) LiTrade //获取一条记录
}
